<template>
  <div class="prism-player" id="J_prismPlayer"></div>
</template>

<script>
export default {
  name: 'player',
  props: {
    vid: {
      type: String,
      default: ''
    },
    playauth: {
      type: String,
      default: ''
    }
  },
  data(){
    return {
      coursePlan: [],
      currentPlanId: '2c9100107cdf8174017cdfb86f110004',
    }
  },
  methods:{
    init() {
      new Aliplayer({
        id: 'J_prismPlayer',
        width: '100%',
        height: '500px',
        vid: this.vid,
        source: "",
        autoplay: true,
        playauth: this.playauth,
        isLive: false,
        preload: false,
        cover: 'https://learnercms.oss-cn-beijing.aliyuncs.com/course/2021/11/22/d317b8ae-6d26-4937-b787-ce4d32a55d0e.jpg',
        controlBarVisibility: 'click',
        showBarTime: '10000',
      }, function (player) {
      })
      console.log(this.vid)
    }
  },
  mounted () {
    this.init()
  }
}
</script>

<style scoped>

</style>
